

<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="./">
<head>
  <meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>pymatgen.vis package &mdash; pymatgen 2025.6.14 documentation</title>
      <link rel="stylesheet" type="text/css" href="assets/pygments.css?v=03e43079" />
      <link rel="stylesheet" type="text/css" href="assets/css/theme.css?v=e59714d7" />
      <link rel="stylesheet" type="text/css" href="assets/css/custom.css" />

  
    <link rel="canonical" href="https://pymatgen.orgpymatgen.vis.html"/>
      <script src="assets/jquery.js?v=5d32c60e"></script>
      <script src="assets/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
      <script src="assets/documentation_options.js?v=03bec786"></script>
      <script src="assets/doctools.js?v=9bcbadda"></script>
      <script src="assets/sphinx_highlight.js?v=dc90522c"></script>
    <script src="assets/js/theme.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" /> 
</head>

<body class="wy-body-for-nav"> 
  <div class="wy-grid-for-nav">
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search"  style="background: linear-gradient(0deg, rgba(23,63,162,1) 0%, rgba(0,70,192,1) 100%)" >

          
          
          <a href="index.html">
            
          </a>
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>
        </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
              <!-- Local TOC -->
              <div class="local-toc"><ul>
<li><a class="reference internal" href="#">pymatgen.vis package</a><ul>
<li><a class="reference internal" href="#submodules">Submodules</a></li>
<li><a class="reference internal" href="#module-pymatgen.vis.plotters">pymatgen.vis.plotters module</a><ul>
<li><a class="reference internal" href="#pymatgen.vis.plotters.SpectrumPlotter"><code class="docutils literal notranslate"><span class="pre">SpectrumPlotter</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.vis.plotters.SpectrumPlotter.add_spectra"><code class="docutils literal notranslate"><span class="pre">SpectrumPlotter.add_spectra()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.plotters.SpectrumPlotter.add_spectrum"><code class="docutils literal notranslate"><span class="pre">SpectrumPlotter.add_spectrum()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.plotters.SpectrumPlotter.get_plot"><code class="docutils literal notranslate"><span class="pre">SpectrumPlotter.get_plot()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.plotters.SpectrumPlotter.save_plot"><code class="docutils literal notranslate"><span class="pre">SpectrumPlotter.save_plot()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.plotters.SpectrumPlotter.show"><code class="docutils literal notranslate"><span class="pre">SpectrumPlotter.show()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#module-pymatgen.vis.structure_chemview">pymatgen.vis.structure_chemview module</a><ul>
<li><a class="reference internal" href="#pymatgen.vis.structure_chemview.quick_view"><code class="docutils literal notranslate"><span class="pre">quick_view()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#module-pymatgen.vis.structure_vtk">pymatgen.vis.structure_vtk module</a><ul>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.MultiStructuresInteractorStyle"><code class="docutils literal notranslate"><span class="pre">MultiStructuresInteractorStyle</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.MultiStructuresInteractorStyle.keyPressEvent"><code class="docutils literal notranslate"><span class="pre">MultiStructuresInteractorStyle.keyPressEvent()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.MultiStructuresVis"><code class="docutils literal notranslate"><span class="pre">MultiStructuresVis</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.DEFAULT_ANIMATED_MOVIE_OPTIONS"><code class="docutils literal notranslate"><span class="pre">MultiStructuresVis.DEFAULT_ANIMATED_MOVIE_OPTIONS</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.apply_tags"><code class="docutils literal notranslate"><span class="pre">MultiStructuresVis.apply_tags()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.display_help"><code class="docutils literal notranslate"><span class="pre">MultiStructuresVis.display_help()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.display_info"><code class="docutils literal notranslate"><span class="pre">MultiStructuresVis.display_info()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.display_warning"><code class="docutils literal notranslate"><span class="pre">MultiStructuresVis.display_warning()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.erase_info"><code class="docutils literal notranslate"><span class="pre">MultiStructuresVis.erase_info()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.erase_warning"><code class="docutils literal notranslate"><span class="pre">MultiStructuresVis.erase_warning()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.set_animated_movie_options"><code class="docutils literal notranslate"><span class="pre">MultiStructuresVis.set_animated_movie_options()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.set_structure"><code class="docutils literal notranslate"><span class="pre">MultiStructuresVis.set_structure()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.set_structures"><code class="docutils literal notranslate"><span class="pre">MultiStructuresVis.set_structures()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureInteractorStyle"><code class="docutils literal notranslate"><span class="pre">StructureInteractorStyle</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureInteractorStyle.keyPressEvent"><code class="docutils literal notranslate"><span class="pre">StructureInteractorStyle.keyPressEvent()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureInteractorStyle.leftButtonPressEvent"><code class="docutils literal notranslate"><span class="pre">StructureInteractorStyle.leftButtonPressEvent()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureInteractorStyle.leftButtonReleaseEvent"><code class="docutils literal notranslate"><span class="pre">StructureInteractorStyle.leftButtonReleaseEvent()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureInteractorStyle.mouseMoveEvent"><code class="docutils literal notranslate"><span class="pre">StructureInteractorStyle.mouseMoveEvent()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureVis"><code class="docutils literal notranslate"><span class="pre">StructureVis</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureVis.add_bonds"><code class="docutils literal notranslate"><span class="pre">StructureVis.add_bonds()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureVis.add_edges"><code class="docutils literal notranslate"><span class="pre">StructureVis.add_edges()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureVis.add_faces"><code class="docutils literal notranslate"><span class="pre">StructureVis.add_faces()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureVis.add_line"><code class="docutils literal notranslate"><span class="pre">StructureVis.add_line()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureVis.add_partial_sphere"><code class="docutils literal notranslate"><span class="pre">StructureVis.add_partial_sphere()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureVis.add_picker"><code class="docutils literal notranslate"><span class="pre">StructureVis.add_picker()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureVis.add_picker_fixed"><code class="docutils literal notranslate"><span class="pre">StructureVis.add_picker_fixed()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureVis.add_polyhedron"><code class="docutils literal notranslate"><span class="pre">StructureVis.add_polyhedron()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureVis.add_site"><code class="docutils literal notranslate"><span class="pre">StructureVis.add_site()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureVis.add_text"><code class="docutils literal notranslate"><span class="pre">StructureVis.add_text()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureVis.add_triangle"><code class="docutils literal notranslate"><span class="pre">StructureVis.add_triangle()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureVis.display_help"><code class="docutils literal notranslate"><span class="pre">StructureVis.display_help()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureVis.orthogonalize_structure"><code class="docutils literal notranslate"><span class="pre">StructureVis.orthogonalize_structure()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureVis.redraw"><code class="docutils literal notranslate"><span class="pre">StructureVis.redraw()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureVis.rotate_view"><code class="docutils literal notranslate"><span class="pre">StructureVis.rotate_view()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureVis.set_structure"><code class="docutils literal notranslate"><span class="pre">StructureVis.set_structure()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureVis.show"><code class="docutils literal notranslate"><span class="pre">StructureVis.show()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureVis.write_image"><code class="docutils literal notranslate"><span class="pre">StructureVis.write_image()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureVis.zoom"><code class="docutils literal notranslate"><span class="pre">StructureVis.zoom()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.vis.structure_vtk.make_movie"><code class="docutils literal notranslate"><span class="pre">make_movie()</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu"  style="background: linear-gradient(0deg, rgba(23,63,162,1) 0%, rgba(0,70,192,1) 100%)" >
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">pymatgen</a>
      </nav>

      <div class="wy-nav-content">
        <div class="rst-content style-external-links">
          <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
      <li class="breadcrumb-item active">pymatgen.vis package</li>
      <li class="wy-breadcrumbs-aside">
              <a href="https://github.com/materialsproject/pymatgen/blob/master/docs_rst/pymatgen.vis.rst" class="fa fa-github"> Edit on GitHub</a>
      </li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
             
  <section id="module-pymatgen.vis">
<span id="pymatgen-vis-package"></span><h1>pymatgen.vis package<a class="headerlink" href="#module-pymatgen.vis" title="Link to this heading"></a></h1>
<p>The vis package implements various visualization tools. For example, a VTK
Structure viewer.</p>
<section id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Link to this heading"></a></h2>
</section>
<section id="module-pymatgen.vis.plotters">
<span id="pymatgen-vis-plotters-module"></span><h2>pymatgen.vis.plotters module<a class="headerlink" href="#module-pymatgen.vis.plotters" title="Link to this heading"></a></h2>
<p>This module defines generic plotters.</p>
<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.vis.plotters.SpectrumPlotter">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">SpectrumPlotter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xshift</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">yshift</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">stack</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">color_cycle</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">('qualitative',</span> <span class="pre">'Set1_9')</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/plotters.py#L12-L141"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.plotters.SpectrumPlotter" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Plot Spectrum objects and subclasses.</p>
<p>Note that the interface is extremely flexible given that there are many
different ways in which people want to view spectra. The typical usage is:</p>
<blockquote>
<div><p># Initializes plotter with some optional args. Defaults are usually
# fine,
plotter = SpectrumPlotter()</p>
<p># Adds a DOS (A kind of spectra) with a label.
plotter.add_spectrum(“Total DOS”, dos)</p>
<p># Alternatively, you can add a dict of DOSs. This is the typical
# form returned by CompleteDos.get_spd/element/others_dos().
plotter.add_spectra({“dos1”: dos1, “dos2”: dos2})</p>
</div></blockquote>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>xshift</strong> (<em>float</em>) – A shift that is applied to the x values. This is
commonly used to shift to an arbitrary zero. e.g. zeroing at the
Fermi energy in DOS, or at the absorption edge in XAS spectra. The
same xshift is applied to all spectra.</p></li>
<li><p><strong>yshift</strong> (<em>float</em>) – A shift that is applied to the y values. This is
commonly used to displace spectra for easier visualization.
Successive spectra are applied successive shifts.</p></li>
<li><p><strong>stack</strong> (<em>bool</em>) – Whether to stack plots rather than simply plot them.
For example, DOS plot can usually be stacked to look at the
contribution of each orbital.</p></li>
<li><p><strong>color_cycle</strong> (<em>str</em>) – Default color cycle to use. Note that this can be
overridden.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.plotters.SpectrumPlotter.add_spectra">
<span class="sig-name descname"><span class="pre">add_spectra</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">spectra_dict</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">key_sort_func</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/plotters.py#L72-L83"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.plotters.SpectrumPlotter.add_spectra" title="Link to this definition"></a></dt>
<dd><p>Add a dictionary of Spectrum, with an optional sorting function for the
keys.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>spectra_dict</strong> – dict of {label: Spectrum}</p></li>
<li><p><strong>key_sort_func</strong> – function used to sort the dos_dict keys.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.plotters.SpectrumPlotter.add_spectrum">
<span class="sig-name descname"><span class="pre">add_spectrum</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">label</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">spectrum</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">color</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/plotters.py#L55-L70"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.plotters.SpectrumPlotter.add_spectrum" title="Link to this definition"></a></dt>
<dd><p>Adds a Spectrum for plotting.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>label</strong> (<em>str</em>) – Label for the Spectrum. Must be unique.</p></li>
<li><p><strong>spectrum</strong> – Spectrum object</p></li>
<li><p><strong>color</strong> (<em>str</em>) – This is passed on to matplotlib. e.g. “k–” indicates
a dashed black line. If None, a color will be chosen based on
the default color cycle.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.plotters.SpectrumPlotter.get_plot">
<span class="sig-name descname"><span class="pre">get_plot</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xlim</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ylim</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/plotters.py#L85-L126"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.plotters.SpectrumPlotter.get_plot" title="Link to this definition"></a></dt>
<dd><p>Get a matplotlib plot showing the DOS.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>xlim</strong> – Specifies the x-axis limits. Set to None for automatic
determination.</p></li>
<li><p><strong>ylim</strong> – Specifies the y-axis limits.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.plotters.SpectrumPlotter.save_plot">
<span class="sig-name descname"><span class="pre">save_plot</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">filename</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/plotters.py#L128-L136"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.plotters.SpectrumPlotter.save_plot" title="Link to this definition"></a></dt>
<dd><p>Save matplotlib plot to a file.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>filename</strong> (<em>str</em>) – Filename to write to. Must include extension to specify image format.</p></li>
<li><p><strong>kwargs</strong> – passed to get_plot.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.plotters.SpectrumPlotter.show">
<span class="sig-name descname"><span class="pre">show</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/plotters.py#L138-L141"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.plotters.SpectrumPlotter.show" title="Link to this definition"></a></dt>
<dd><p>Show the plot using matplotlib.</p>
</dd></dl>

</dd></dl>

</section>
<section id="module-pymatgen.vis.structure_chemview">
<span id="pymatgen-vis-structure-chemview-module"></span><h2>pymatgen.vis.structure_chemview module<a class="headerlink" href="#module-pymatgen.vis.structure_chemview" title="Link to this heading"></a></h2>
<p>Visualization for structures using chemview.</p>
<dl class="py function">
<dt class="sig sig-object py" id="pymatgen.vis.structure_chemview.quick_view">
<span class="sig-name descname"><span class="pre">quick_view</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bonds</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">conventional</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">transform</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">show_box</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bond_tol</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">stick_radius</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.1</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_chemview.py#L20-L117"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_chemview.quick_view" title="Link to this definition"></a></dt>
<dd><p>A function to visualize pymatgen Structure objects in jupyter notebook using chemview package.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – pymatgen Structure</p></li>
<li><p><strong>bonds</strong> – (bool) visualize bonds. Bonds are found by comparing distances
to added covalent radii of pairs. Defaults to True.</p></li>
<li><p><strong>conventional</strong> – (bool) use conventional cell. Defaults to False.</p></li>
<li><p><strong>transform</strong> – (list) can be used to make supercells with pymatgen.Structure.make_supercell method</p></li>
<li><p><strong>show_box</strong> – (bool) unit cell is shown. Defaults to True.</p></li>
<li><p><strong>bond_tol</strong> – (float) used if bonds=True. Sets the extra distance tolerance when finding bonds.</p></li>
<li><p><strong>stick_radius</strong> – (float) radius of bonds.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>A chemview.MolecularViewer object</p>
</dd>
</dl>
</dd></dl>

</section>
<section id="module-pymatgen.vis.structure_vtk">
<span id="pymatgen-vis-structure-vtk-module"></span><h2>pymatgen.vis.structure_vtk module<a class="headerlink" href="#module-pymatgen.vis.structure_vtk" title="Link to this heading"></a></h2>
<p>This module contains classes to wrap Python VTK to make nice molecular plots.</p>
<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.MultiStructuresInteractorStyle">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">MultiStructuresInteractorStyle</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">parent</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L1166-L1228"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresInteractorStyle" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureInteractorStyle" title="pymatgen.vis.structure_vtk.StructureInteractorStyle"><code class="xref py py-class docutils literal notranslate"><span class="pre">StructureInteractorStyle</span></code></a></p>
<p>Interactor for MultiStructureVis.</p>
<p>Initialize MultiStructuresInteractorStyle.</p>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.MultiStructuresInteractorStyle.keyPressEvent">
<span class="sig-name descname"><span class="pre">keyPressEvent</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">obj</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">event</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L1173-L1228"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresInteractorStyle.keyPressEvent" title="Link to this definition"></a></dt>
<dd><p>Key press event.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.MultiStructuresVis">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">MultiStructuresVis</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">element_color_mapping</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">show_unit_cell</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">show_bonds</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">show_polyhedron</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">poly_radii_tol_factor</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.5</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">excluded_bonding_elements</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">animated_movie_options</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{'looping_type':</span> <span class="pre">'restart',</span> <span class="pre">'number_of_loops':</span> <span class="pre">1,</span> <span class="pre">'time_between_frames':</span> <span class="pre">0.1,</span> <span class="pre">'time_between_loops':</span> <span class="pre">1.0}</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L910-L1163"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresVis" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureVis" title="pymatgen.vis.structure_vtk.StructureVis"><code class="xref py py-class docutils literal notranslate"><span class="pre">StructureVis</span></code></a></p>
<p>Visualization for multiple structures.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>element_color_mapping</strong> – Optional color mapping for the elements,
as a dict of {symbol: rgb tuple}. For example, {“Fe”: (255,
123,0), ….} If None is specified, a default based on
Jmol’s color scheme is used.</p></li>
<li><p><strong>show_unit_cell</strong> – Set to False to not show the unit cell
boundaries. Defaults to True.</p></li>
<li><p><strong>show_bonds</strong> – Set to True to show bonds. Defaults to True.</p></li>
<li><p><strong>show_polyhedron</strong> – Set to True to show polyhedrons. Defaults to
False.</p></li>
<li><p><strong>poly_radii_tol_factor</strong> – The polyhedron and bonding code uses the
ionic radii of the elements or species to determine if two
atoms are bonded. This specifies a tolerance scaling factor
such that atoms which are (1 + poly_radii_tol_factor) * sum
of ionic radii apart are still considered as bonded.</p></li>
<li><p><strong>excluded_bonding_elements</strong> – List of atom types to exclude from
bonding determination. Defaults to an empty list. Useful
when trying to visualize a certain atom type in the
framework (e.g., Li in a Li-ion battery cathode material).</p></li>
<li><p><strong>animated_movie_options</strong> (<em>dict</em>) – Options for animated movie.</p></li>
</ul>
</dd>
</dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.MultiStructuresVis.DEFAULT_ANIMATED_MOVIE_OPTIONS">
<span class="sig-name descname"><span class="pre">DEFAULT_ANIMATED_MOVIE_OPTIONS</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">ClassVar</span><span class="p"><span class="pre">[</span></span><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{'looping_type':</span> <span class="pre">'restart',</span> <span class="pre">'number_of_loops':</span> <span class="pre">1,</span> <span class="pre">'time_between_frames':</span> <span class="pre">0.1,</span> <span class="pre">'time_between_loops':</span> <span class="pre">1.0}</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/vis/structure_vtk.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.DEFAULT_ANIMATED_MOVIE_OPTIONS" title="Link to this definition"></a></dt>
<dd></dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.MultiStructuresVis.apply_tags">
<span class="sig-name descname"><span class="pre">apply_tags</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L1017-L1076"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.apply_tags" title="Link to this definition"></a></dt>
<dd><p>Apply tags.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.MultiStructuresVis.display_help">
<span class="sig-name descname"><span class="pre">display_help</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L1092-L1111"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.display_help" title="Link to this definition"></a></dt>
<dd><p>Display the help for various keyboard shortcuts.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.MultiStructuresVis.display_info">
<span class="sig-name descname"><span class="pre">display_info</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">info</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L1139-L1159"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.display_info" title="Link to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>info</strong> (<em>str</em>) – Information.</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.MultiStructuresVis.display_warning">
<span class="sig-name descname"><span class="pre">display_warning</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">warning</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L1113-L1133"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.display_warning" title="Link to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>warning</strong> (<em>str</em>) – Warning.</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.MultiStructuresVis.erase_info">
<span class="sig-name descname"><span class="pre">erase_info</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L1161-L1163"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.erase_info" title="Link to this definition"></a></dt>
<dd><p>Erase all info.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.MultiStructuresVis.erase_warning">
<span class="sig-name descname"><span class="pre">erase_warning</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L1135-L1137"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.erase_warning" title="Link to this definition"></a></dt>
<dd><p>Remove warnings.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.MultiStructuresVis.set_animated_movie_options">
<span class="sig-name descname"><span class="pre">set_animated_movie_options</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">animated_movie_options</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L1078-L1090"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.set_animated_movie_options" title="Link to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>animated_movie_options</strong> (<em>dict</em>) – Options for animated movie.</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.MultiStructuresVis.set_structure">
<span class="sig-name descname"><span class="pre">set_structure</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">reset_camera</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">to_unit_cell</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L1004-L1015"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.set_structure" title="Link to this definition"></a></dt>
<dd><p>Add a structure to the visualizer.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – structure to visualize</p></li>
<li><p><strong>reset_camera</strong> – Set to True to reset the camera to a default
determined based on the structure.</p></li>
<li><p><strong>to_unit_cell</strong> – Whether or not to fall back sites into the unit cell.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.MultiStructuresVis.set_structures">
<span class="sig-name descname"><span class="pre">set_structures</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structures</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Sequence</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tags</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L969-L1002"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.set_structures" title="Link to this definition"></a></dt>
<dd><p>Add list of structures to the visualizer.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structures</strong> (<em>list</em><em>[</em><em>Structures</em><em>]</em>) – structures to be visualized.</p></li>
<li><p><strong>tags</strong> (<em>list</em><em>[</em><em>dict</em><em>]</em>) – List of tags to be applied to the structures.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.StructureInteractorStyle">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">StructureInteractorStyle</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">parent</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L776-L856"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureInteractorStyle" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>A custom interactor style for visualizing structures.</p>
<p>Initialize StructureInteractorStyle.</p>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.StructureInteractorStyle.keyPressEvent">
<span class="sig-name descname"><span class="pre">keyPressEvent</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">obj</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">_event</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L806-L856"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureInteractorStyle.keyPressEvent" title="Link to this definition"></a></dt>
<dd><p>Key press event.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.StructureInteractorStyle.leftButtonPressEvent">
<span class="sig-name descname"><span class="pre">leftButtonPressEvent</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">obj</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">event</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L787-L790"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureInteractorStyle.leftButtonPressEvent" title="Link to this definition"></a></dt>
<dd><p>Left mouse button press event.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.StructureInteractorStyle.leftButtonReleaseEvent">
<span class="sig-name descname"><span class="pre">leftButtonReleaseEvent</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">obj</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">event</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L797-L804"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureInteractorStyle.leftButtonReleaseEvent" title="Link to this definition"></a></dt>
<dd><p>Left mouse button release event.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.StructureInteractorStyle.mouseMoveEvent">
<span class="sig-name descname"><span class="pre">mouseMoveEvent</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">obj</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">event</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L792-L795"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureInteractorStyle.mouseMoveEvent" title="Link to this definition"></a></dt>
<dd><p>Mouse move event.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.StructureVis">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">StructureVis</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">element_color_mapping</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">show_unit_cell</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">show_bonds</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">show_polyhedron</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">poly_radii_tol_factor</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.5</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">excluded_bonding_elements</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L35-L773"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Structure visualization using VTK.</p>
<p>Constructs a Structure Visualization.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>element_color_mapping</strong> – Optional color mapping for the elements,
as a dict of {symbol: rgb tuple}. For example, {“Fe”: (255,
123,0), ….} If None is specified, a default based on
Jmol’s color scheme is used.</p></li>
<li><p><strong>show_unit_cell</strong> – Set to False to not show the unit cell
boundaries. Defaults to True.</p></li>
<li><p><strong>show_bonds</strong> – Set to True to show bonds. Defaults to True.</p></li>
<li><p><strong>show_polyhedron</strong> – Set to True to show polyhedrons. Defaults to
False.</p></li>
<li><p><strong>poly_radii_tol_factor</strong> – The polyhedron and bonding code uses the
ionic radii of the elements or species to determine if two
atoms are bonded. This specifies a tolerance scaling factor
such that atoms which are (1 + poly_radii_tol_factor) * sum
of ionic radii apart are still considered as bonded.</p></li>
<li><p><strong>excluded_bonding_elements</strong> – List of atom types to exclude from
bonding determination. Defaults to an empty list. Useful
when trying to visualize a certain atom type in the
framework (e.g., Li in a Li-ion battery cathode material).</p></li>
</ul>
</dd>
</dl>
<dl class="simple">
<dt>Useful keyboard shortcuts implemented.</dt><dd><p>h : Show help
A/a : Increase/decrease cell by one unit vector in a-direction
B/b : Increase/decrease cell by one unit vector in b-direction
C/c : Increase/decrease cell by one unit vector in c-direction
# : Toggle showing of polyhedrons
- : Toggle showing of bonds
[ : Decrease poly_radii_tol_factor by 0.05
] : Increase poly_radii_tol_factor by 0.05
r : Reset camera direction
o : Orthogonalize structure
Up/Down : Rotate view along Up direction by 90 clock/anticlockwise
Left/right : Rotate view along camera direction by 90
clock/anticlockwise</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.StructureVis.add_bonds">
<span class="sig-name descname"><span class="pre">add_bonds</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">neighbors</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">center</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">color</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">opacity</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">radius</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.1</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L668-L707"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.add_bonds" title="Link to this definition"></a></dt>
<dd><p>Adds bonds for a site.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>neighbors</strong> – Neighbors of the site.</p></li>
<li><p><strong>center</strong> – The site in the center for all bonds.</p></li>
<li><p><strong>color</strong> – Color of the tubes representing the bonds</p></li>
<li><p><strong>opacity</strong> – Opacity of the tubes representing the bonds</p></li>
<li><p><strong>radius</strong> – Radius of tube s representing the bonds</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.StructureVis.add_edges">
<span class="sig-name descname"><span class="pre">add_edges</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">edges</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Sequence</span><span class="p"><span class="pre">[</span></span><span class="pre">Sequence</span><span class="p"><span class="pre">[</span></span><span class="pre">Sequence</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">type</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">'line'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">linewidth</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">color</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">(0.0,</span> <span class="pre">0.0,</span> <span class="pre">0.0)</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L631-L666"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.add_edges" title="Link to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>edges</strong> (<em>Sequence</em>) – List of edges. Each edge is a list of two points.</p></li>
<li><p><strong>type</strong> (<em>str</em>) – Type of the edge. Defaults to “line”. Unused.</p></li>
<li><p><strong>linewidth</strong> (<em>float</em>) – Width of the line.</p></li>
<li><p><strong>color</strong> (<em>tuple</em><em>[</em><em>float</em><em>, </em><em>float</em><em>, </em><em>float</em><em>]</em>) – RGB color.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.StructureVis.add_faces">
<span class="sig-name descname"><span class="pre">add_faces</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">faces</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">color</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">opacity</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.35</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L566-L629"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.add_faces" title="Link to this definition"></a></dt>
<dd><p>Adding face of polygon.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>faces</strong> (<em>list</em>) – Coordinates of the faces.</p></li>
<li><p><strong>color</strong> (<em>tuple</em>) – RGB color.</p></li>
<li><p><strong>opacity</strong> (<em>float</em>) – Opacity</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.StructureVis.add_line">
<span class="sig-name descname"><span class="pre">add_line</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">start</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">end</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">color</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">(0.5,</span> <span class="pre">0.5,</span> <span class="pre">0.5)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">width</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L405-L433"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.add_line" title="Link to this definition"></a></dt>
<dd><p>Adds a line.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>start</strong> – Starting coordinates for line.</p></li>
<li><p><strong>end</strong> – Ending coordinates for line.</p></li>
<li><p><strong>color</strong> – Color for text as RGB. Defaults to grey.</p></li>
<li><p><strong>width</strong> – Width of line. Defaults to 1.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.StructureVis.add_partial_sphere">
<span class="sig-name descname"><span class="pre">add_partial_sphere</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">coords</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">radius</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">color</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">start</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">end</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">360</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">opacity</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1.0</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L355-L382"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.add_partial_sphere" title="Link to this definition"></a></dt>
<dd><p>Adding a partial sphere (to display partial occupancies.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>coords</strong> (<em>NDArray</em>) – Coordinates</p></li>
<li><p><strong>radius</strong> (<em>float</em>) – Radius of sphere</p></li>
<li><p><strong>color</strong> (<em>tuple</em>) – RGB color of sphere</p></li>
<li><p><strong>start</strong> (<em>float</em>) – Starting angle.</p></li>
<li><p><strong>end</strong> (<em>float</em>) – Ending angle.</p></li>
<li><p><strong>opacity</strong> (<em>float</em>) – Opacity.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.StructureVis.add_picker">
<span class="sig-name descname"><span class="pre">add_picker</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L739-L773"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.add_picker" title="Link to this definition"></a></dt>
<dd><p>Create a cell picker.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.StructureVis.add_picker_fixed">
<span class="sig-name descname"><span class="pre">add_picker_fixed</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L709-L737"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.add_picker_fixed" title="Link to this definition"></a></dt>
<dd><p>Create a cell picker.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.StructureVis.add_polyhedron">
<span class="sig-name descname"><span class="pre">add_polyhedron</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">neighbors</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">center</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">color</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">opacity</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">draw_edges</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">edges_color</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">(0.0,</span> <span class="pre">0.0,</span> <span class="pre">0.0)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">edges_linewidth</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">2</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L435-L498"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.add_polyhedron" title="Link to this definition"></a></dt>
<dd><p>Adds a polyhedron.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>neighbors</strong> – Neighbors of the polyhedron (the vertices).</p></li>
<li><p><strong>center</strong> – The atom in the center of the polyhedron.</p></li>
<li><p><strong>color</strong> – Color for text as RGB.</p></li>
<li><p><strong>opacity</strong> – Opacity of the polyhedron</p></li>
<li><p><strong>draw_edges</strong> – If set to True, the a line will be drawn at each edge</p></li>
<li><p><strong>edges_color</strong> – Color of the line for the edges</p></li>
<li><p><strong>edges_linewidth</strong> – Width of the line drawn for the edges</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.StructureVis.add_site">
<span class="sig-name descname"><span class="pre">add_site</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">site</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L316-L353"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.add_site" title="Link to this definition"></a></dt>
<dd><p>Add a site to the render window. The site is displayed as a sphere, the
color of which is determined based on the element. Partially occupied
sites are displayed as a single element color, though the site info
still shows the partial occupancy.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>site</strong> – Site to add.</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.StructureVis.add_text">
<span class="sig-name descname"><span class="pre">add_text</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">coords</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">color</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">(0,</span> <span class="pre">0,</span> <span class="pre">0)</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L384-L403"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.add_text" title="Link to this definition"></a></dt>
<dd><p>Add text at a coordinate.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>coords</strong> – Coordinates to add text at.</p></li>
<li><p><strong>text</strong> – Text to place.</p></li>
<li><p><strong>color</strong> – Color for text as RGB. Defaults to black.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.StructureVis.add_triangle">
<span class="sig-name descname"><span class="pre">add_triangle</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">neighbors</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">color</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">center</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">opacity</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.4</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">draw_edges</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">edges_color</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">(0.0,</span> <span class="pre">0.0,</span> <span class="pre">0.0)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">edges_linewidth</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">2</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L500-L564"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.add_triangle" title="Link to this definition"></a></dt>
<dd><p>Adds a triangular surface between three atoms.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>neighbors</strong> – Atoms between which a triangle will be drawn.</p></li>
<li><p><strong>color</strong> – Color for triangle as RGB.</p></li>
<li><p><strong>center</strong> – The “central atom” of the triangle</p></li>
<li><p><strong>opacity</strong> – opacity of the triangle</p></li>
<li><p><strong>draw_edges</strong> – If set to True, the a line will be drawn at each edge</p></li>
<li><p><strong>edges_color</strong> – Color of the line for the edges</p></li>
<li><p><strong>edges_linewidth</strong> – Width of the line drawn for the edges</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.StructureVis.display_help">
<span class="sig-name descname"><span class="pre">display_help</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L183-L199"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.display_help" title="Link to this definition"></a></dt>
<dd><p>Display the help for various keyboard shortcuts.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.StructureVis.orthogonalize_structure">
<span class="sig-name descname"><span class="pre">orthogonalize_structure</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L177-L181"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.orthogonalize_structure" title="Link to this definition"></a></dt>
<dd><p>Orthogonalize the structure.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.StructureVis.redraw">
<span class="sig-name descname"><span class="pre">redraw</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">reset_camera</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L155-L175"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.redraw" title="Link to this definition"></a></dt>
<dd><p>Redraw the render window.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>reset_camera</strong> – Set to True to reset the camera to a
pre-determined default for each structure. Defaults to False.</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.StructureVis.rotate_view">
<span class="sig-name descname"><span class="pre">rotate_view</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">axis_ind</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">angle</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L114-L129"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.rotate_view" title="Link to this definition"></a></dt>
<dd><p>Rotate the camera view.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>axis_ind</strong> – Index of axis to rotate. Defaults to 0, i.e., a-axis.</p></li>
<li><p><strong>angle</strong> – Angle to rotate by. Defaults to 0.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.StructureVis.set_structure">
<span class="sig-name descname"><span class="pre">set_structure</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">reset_camera</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">to_unit_cell</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L201-L300"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.set_structure" title="Link to this definition"></a></dt>
<dd><p>Add a structure to the visualizer.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – structure to visualize</p></li>
<li><p><strong>reset_camera</strong> – Set to True to reset the camera to a default
determined based on the structure.</p></li>
<li><p><strong>to_unit_cell</strong> – Whether or not to fall back sites into the unit cell.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.StructureVis.show">
<span class="sig-name descname"><span class="pre">show</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L308-L314"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.show" title="Link to this definition"></a></dt>
<dd><p>Display the visualizer.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.StructureVis.write_image">
<span class="sig-name descname"><span class="pre">write_image</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">filename</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'image.png'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">magnification</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">image_format</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'png'</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L131-L153"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.write_image" title="Link to this definition"></a></dt>
<dd><p>Save render window to an image.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>filename</strong> – file to save to. Defaults to image.png.</p></li>
<li><p><strong>magnification</strong> – Use it to render high res images.</p></li>
<li><p><strong>image_format</strong> – choose between jpeg, png. Defaults to ‘png’.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.StructureVis.zoom">
<span class="sig-name descname"><span class="pre">zoom</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">factor</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L302-L306"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.zoom" title="Link to this definition"></a></dt>
<dd><p>Zoom the camera view by a factor.</p>
</dd></dl>

</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="pymatgen.vis.structure_vtk.make_movie">
<span class="sig-name descname"><span class="pre">make_movie</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structures</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">output_filename</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'movie.mp4'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">zoom</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fps</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">20</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bitrate</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'10000k'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">quality</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../vis/structure_vtk.py#L859-L907"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.make_movie" title="Link to this definition"></a></dt>
<dd><p>Generate a movie from a sequence of structures using vtk and ffmpeg.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structures</strong> (<em>[</em><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a><em>]</em>) – sequence of structures</p></li>
<li><p><strong>output_filename</strong> (<em>str</em>) – filename for structure output. defaults to
movie.mp4</p></li>
<li><p><strong>zoom</strong> (<em>float</em>) – A zoom to be applied to the visualizer. Defaults to 1.0.</p></li>
<li><p><strong>fps</strong> (<em>int</em>) – Frames per second for the movie. Defaults to 20.</p></li>
<li><p><strong>bitrate</strong> (<em>str</em>) – Video bitrate. Defaults to “10000k” (fairly high
quality).</p></li>
<li><p><strong>quality</strong> (<em>int</em>) – A quality scale. Defaults to 1.</p></li>
<li><p><strong>kwargs</strong> – Any kwargs supported by StructureVis to modify the images
generated.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

</section>
</section>


           </div>
          </div>
          <footer>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2011, Pymatgen Development Team.</p>
  </div>

  Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
    <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
    provided by <a href="https://readthedocs.org">Read the Docs</a>.
   

</footer>
        </div>
      </div>
    </section>
  </div>
  <script>
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script> 

</body>
</html>